<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class GoodAttribute extends Model
{
    protected $fillable = [
        'key',
        'name',
        'alias',
        'search_key',
        'color',       // 新增颜色字段
        'parent_id'
    ];

    protected $appends = ['searchKey'];

    public function getSearchKeyAttribute()
    {
        return $this->attributes['search_key'];
    }
}
